{% extends "teacher/base.html" %}


{% block content_main %}
<form method="post" class="layui-form" action="/test_paper/add_test_paper">
  <div class="layui-form-item">
    <label class="layui-form-label">试卷名字</label>
    <div class="layui-input-block">
      <input type="text" name="name" required  lay-verify="required" placeholder="请输入试卷名字" autocomplete="off" class="layui-input">
    </div>
  </div>
{#  <div class="layui-form-item">#}
{#    <label class="layui-form-label">密码框</label>#}
{#    <div class="layui-input-inline">#}
{#      <input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">#}
{#    </div>#}
{#    <div class="layui-form-mid layui-word-aux">辅助文字</div>#}
{#  </div>#}
  <div class="layui-form-item">
    <label class="layui-form-label">班级</label>
    <div class="layui-input-block">
      <select name="id_classes" lay-verify="required">
        <option value=""></option>
        {% for i in classes %}
            <option value="{{ i.id }}">{{ i.name }}</option>
        {% endfor %}
      </select>
    </div>
  </div>
{#  <div class="layui-form-item">#}
{#    <label class="layui-form-label">公开考试</label>#}
{#    <div class="layui-input-block">#}
{#      <input type="checkbox" name="switch" lay-skin="switch">#}
{#    </div>#}
{#  </div>#}
  <div class="layui-form-item">
    <div class="layui-input-block">
      <button class="layui-btn" type="submit">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
{% endblock %}


{% block script %}
<script>
//Demo
layui.use('form', function(){
  var form = layui.form;

  //提交
  form.on('submit(formDemo)', function(data){
    layer.msg(JSON.stringify(data.field));
    {#document.getElementById("")#}
    return false;
  });
});
</script>
{% endblock %}